<style lang="less" scoped src="./attendance.less"></style>
<script src="./attendance.js"></script>
<template>
    <div>
        <Row class="query">
            <Col span="24">
            班级名称:<Input  v-model="query.name" style="width: 15%"></Input>
            学期:<Select v-model="query.classSeason" style="width: 15%">
                    <Option v-for="item in classSeasonList" :value="item.id">{{item.name}}</Option>
                </Select>
            部门:<Input v-model="query.departmentName"  :readonly="true"   @on-click="deptModal = true" icon="search" style="width: 15%"></Input>
            </Col>
        </Row>
        <Row class="query">
            <Col span="20">
            <span @click="doQuery"><Button type="primary" icon="android-search">查询</Button></span>
            <span @click="query={};doQuery();"><Button type="primary" icon="refresh">重置</Button></span>
            </Col>
        </Row>
        <div class="main-table">
            <Table border :columns="columns" :data="dataList" ></Table>
        </div>
        <div class="pagination">
            <Page :total="total" size="small" :page-size="pageSize" :current.sync="pageIndex" @on-change="init"
                  show-total show-elevator></Page>
        </div>
        <Modal v-model="deptModal"
               title="部门列表"
               width="20%"
               :mask-closable="false">
            <custom-tree ref="dept"
                         url="/base/organize/findOrgAll"
                         :formData="{'orgid': baseuser.orgId}"
                         :showCheckbox="false"></custom-tree>
            <div slot="footer">
                <Button type="primary" @click="setDept">确认</Button>
                <Button type="error" style="margin-left: 8px" @click="cancelSelect">清空</Button>
            </div>
        </Modal>
        <Modal
                title="班级学员列表"
                v-model="modelVisible"
                width="60%">
            <attendance-info :classId="entity.id"></attendance-info>
        </Modal>
    </div>
</template>

